/**
 * Created by kangm_000 on 2016/12/1 0001.
 */
$(function () {
    var pageText = $('body').attr('page-text');
    if(parent){
        if(parent.selectMenu != null && parent.selectMenu != undefined){
            parent.selectMenu(pageText);
            parent.scrollToTop(); 
        }
    }
})

//风格切换，供parent页面调用
function changeSkin(color) {
    $('body').attr('class', color);
}

function getContentHeight(){
    return $('.tpl-content-wrapper').height();
}

//下拉列表设置选中值
function selectSet(id, value){
	var options = $("#" + id).find('option');
	options.each(function(){
	   if($(this).val() == value){
		   $("#" + id).parent().find('.am-selected-status').text($(this).text());
	   }
	});
}